



import React, { Component } from 'react';
import {
  Platform,
  StyleSheet,
  View,
  TouchableOpacity,
  Alert,
  Image,
  Text
} from 'react-native';
const Dimensions = require('Dimensions')
const { width } = Dimensions.get('window');
let left = (width - (width*0.1)*4) / 5;

export default class TopMenu extends Component<{}> {
  constructor(props){
    super(props);
  }
  render() {
    const { navigate,router,navigation } = this.props;
    return(
      <View style={styles.container}>
        <TouchableOpacity style={styles.backStyle} onPress={()=>{
          // navigate(router)
          navigation.goBack()
        }}>
          <Image source={require('../../Assets/images/arrowLeft.png')} style={styles.iconStyle}/>
        </TouchableOpacity>
        <View style={styles.titleStyle}>
          <Text style={{fontSize:20}}>{this.props.title}</Text>
        </View>
        <View style={styles.rightStyle}>
        </View>
      </View>
    )
  }
}

const styles = StyleSheet.create({
  container:{
    height:50,
    backgroundColor:'white',
    width: width,
    flexDirection:'row',
    alignItems:'center',
    position:'absolute',
    top:0,
    zIndex:1000,
  },
  iconStyle:{
    width:30,
    height:30,
  },
  titleStyle:{
    flex:1,
    alignItems:'center',
  },
  rightStyle:{
    flex:0.2,
  },
  backStyle:{
    flex:0.2,
    alignItems:'center',
  }
});